package com.xiaoqi.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author Rookie Coder
 * @Description 配置类
 * @Date
 **/
@Configuration
public class ApplicationContextConfig {

    // 配置一个组件
    @Bean
    @LoadBalanced // 配置负载均衡
    RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
